import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

Vue.config.productionTip = false;

import axios from "axios";
Vue.prototype.$axios = axios;

import Vant from "vant";
import "vant/lib/index.css";
Vue.use(Vant);

// Vue.directive("bg", {
//   bind(el, binding) {
//     el.style.background = binding.value;
//   },
//   updated(el, binding) {
//     el.style.background = binding.value;
//   },
// });

// 很多时候可以把bind和update简写为一个函数，如下所示
Vue.directive("bg", function(el, binding) {
  el.style.background = binding.value;
});

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
